<template>
    <button>点击登录</button>
</template>
<script>
export default {
    mounted() {
        
    },
    beforeRouteEnter(to, from, next) {
        console.log('beforeRouteEnter', to);
        console.log('beforeRouteEnter', from);
        next();
    },
    beforeRouteUpdate(to, from, next) {
        console.log('beforeRouteUpdate', to);
        console.log('beforeRouteUpdate', from);
        next();
    },
    beforeRouteLeave(to, from, next) {
        console.log('beforeRouteLeave', to);
        console.log('beforeRouteLeave', from);
        next();
    },
}
</script>
<style scoped>
button {
    width: 200px;
    height: 100px;
    margin: 200px auto;
}
</style>